# Contributor: Maxim Karasev <begs@disroot.org>
# Maintainer: Maxim Karasev <begs@disroot.org>
pkgname=oxipng
pkgver=5.0.1
pkgrel=0
pkgdesc="Multithreaded PNG optimizer written in Rust"
url="https://github.com/shssoichiro/oxipng"
arch="x86_64 aarch64 x86 ppc64le" # limited by rust and libdeflate-sys
license="MIT"
makedepends="cargo"
source="https://github.com/shssoichiro/oxipng/archive/v$pkgver/oxipng-$pkgver.tar.gz"

build() {
	cargo build --release --locked
}

check() {
	cargo test --release --locked
}

package() {
	cargo install --locked --path . --root="$pkgdir/usr"
	rm "$pkgdir"/usr/.crates*
}

sha512sums="
ec96465ba1aee38c6fa59e0289a41f18247bb0dbb85884d1d90511347271669af5254d0b8f61ad6be9bf98c653835a7f2b2f8de12a5df39caf9935e30342f91d  oxipng-5.0.1.tar.gz
"
